/********************************************************************
	file base:	Info
	file ext:	h
	author:		JiangHuai
	
	purpose:	info struct
*********************************************************************/

#ifndef INFO_JH
#define INFO_JH

#include "Lib/CXImage600/include/ximage.h"
#include <string>
#include "PayLoad.h"
using namespace std;

//store info for embed & extract
class Info
{
public:
	bool imageAvaliable;
	bool embedAvaliable;
	CxImage image;
	CxImage embed;
	ENUM_CXIMAGE_FORMATS fileType;
	string plainText;
	string key;

	payload PayLoad;
	Info(CxImage imageV, ENUM_CXIMAGE_FORMATS fileTypeV, bool ia, bool ea):
	image(imageV), fileType(fileTypeV), imageAvaliable(ia), embedAvaliable(ea) {
		PayLoad.compressed = false;
		PayLoad.encrypted = false;
		PayLoad.originalTextLength = 0;
		PayLoad.encompressedTextLength = 0;
		PayLoad.embedLength = 0;
		PayLoad.data = NULL;
	}
	~Info() {
		free(PayLoad.data);
	}
};

Info info( CxImage(), CXIMAGE_FORMAT_UNKNOWN, false, false);

#endif